var request = require('request');
var md5 = require('md5');
var db = require('./config/mongo_database');
var jwt = require('jsonwebtoken');
var secret = require('./config/secret');
var redisClient = require('./config/redis_database').redisClient;
var tokenManager = require('./config/token_manager');
var logger = require('./config/log4js').logger('access');
var property = require('./route/property');

function test1(){
	var user = new db.userModel();
	user.username = '13641892349';
	user.nick     = '136****2349';
	user.header   = '/header/me-'+Math.round(Math.random()*9+1)+'.png';
	user.password = md5('123456');
	user.save(function(err) {
		db.userModel.findOne({username:'13641892349'}, function(err, user){
			console.log(user)
		})
	});
}

function test2(){
	property.addProperty({
		userid:  '14e1b600b1fd579f47433b88e8d85291',
		type:    '0',
		btype:   0,
		content: '账户充币',
		pay:     0.02,
		trade:   '1',
		detail:  {saddr:'24a834e2616a737f', raddr:'11ba834e2616a5121',username:'13641892349', nick:'136****2349' }
	})
}


test2()
